import puppeteer, {KnownDevices} from 'puppeteer'

const iPhone = KnownDevices['Galaxy S8'];
function delay(time) {
    return new Promise(function(resolve) { 
        setTimeout(resolve, time)
    });
}
export default async () => {
    const browser = await puppeteer.launch({
        headless: false,
        args: [
            '--auto-open-devtools-for-tabs',
            // '--use-mobile-user-agent',
            // '--user-agent="Android"',
            // '--user-agent=Galaxy S8',
        ],
    })
  
    const page = await browser.newPage()
    
    await page.emulate(iPhone)
    
    let gotourl = 'https://www.jd.com/'
    await page.goto(gotourl)

  }